function isCorrect = checkTemplateData(main)

    %% Notation
    
    filterType = main.template.filterType;
    aa = main.template.aa;
    ap = main.template.ap;
    wa = main.template.wa;
    wp = main.template.wp;
    waMENOS = main.template.waMENOS;
    waMAS = main.template.waMAS;
    wpMENOS = main.template.wpMENOS;
    wpMAS = main.template.wpMAS;
    sliderK = main.template.wdes;

    isCorrect = 1;
    
    %% Data check
    
    switch filterType
        case 1  % Band pass
            
            if (ap >= aa) || (waMENOS >= wpMENOS) || (wpMENOS >= wpMAS) || (wpMAS >= waMAS)
                isCorrect = 0;
            end
            
%             if (wpMENOS*wpMAS) ~= (waMENOS*waMAS)   % Checks simetry
%                 isCorrect = 0;
%             end
            
        case 2  % Low pass
            
            if (ap >= aa) || (wp >= wa)
                isCorrect = 0;
            end
        case 3  % High pass
            
            if (ap >= aa) || (wa >= wp)
                isCorrect = 0;
            end            
            
        case 4  % Band reject
            
            if (ap >= aa) || (wpMENOS >= waMENOS) || (waMENOS >= waMAS) || (waMAS >= wpMAS)
                isCorrect = 0;
            end
            
%             if (wpMENOS*wpMAS) ~= (waMENOS*waMAS)   % Checks simetry
%                 isCorrect = 0;
%             end
    end
    
    if (aa<0) || (ap<0) || (wa<0) || (wp<0) || (waMENOS<0) || (waMAS<0) || (wpMENOS<0) || (wpMAS<0)
        isCorrect = 0;
    end
    
    if (sliderK > 1) || (sliderK <0)
        isCorrect = 0;
    end
end
